import axios from '@/utils/request'

import config from '@/common/config'

let base=config.getArcBasePath();

/**
 * 档案评论表
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={id:'主键 主键',userid:'评论人',username:'评论人姓名',star:'星级',createDate:'时间',archiveId:'档案编号',pcommentId:'上级评论',praiseSum:'点赞数量',isShow:'是否显示0否1是',toUserid:'回复用户编号',toUsername:'回复用户名',lvl:'层级0,1,2,3,4',context:'评论内容',branchId:'机构编号'}
 **/
 
//普通查询 条件之间and关系  
export const listArchiveComment = params => { return axios.get(`${base}/mdp/arc/archiveComment/list`, { params: params }); };

//模糊查询档案评论表 条件之间or关系  
//export const listArchiveCommentKey = params => { return axios.get(`${base}/mdp/arc/archiveComment/listKey`, { params: params }); };

//删除一条档案评论表 params={id:'主键 主键'}
export const delArchiveComment = params => { return axios.post(`${base}/mdp/arc/archiveComment/del`,params); };

//批量删除档案评论表  params=[{id:'主键 主键'}]
export const batchDelArchiveComment = params => { return axios.post(`${base}/mdp/arc/archiveComment/batchDel`, params); };

//修改一条档案评论表记录
export const editArchiveComment = params => { return axios.post(`${base}/mdp/arc/archiveComment/edit`, params); };

//新增一条档案评论表
export const addArchiveComment = params => { return axios.post(`${base}/mdp/arc/archiveComment/add`, params); };

//打开评论
export const showComment = params => { return axios.post(`${base}/mdp/arc/archiveComment/show`, params); };

//关闭评论
export const unShowComment = params => { return axios.post(`${base}/mdp/arc/archiveComment/unshow`, params); };


//点赞
export const praiseComment = params => { return axios.post(`${base}/mdp/arc/archiveComment/praise`, params); };
